package com.xiaowan.user.service;

import com.xiaowan.user.dao.UserMapper;
import com.xiaowan.user.entity.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service("userServiceImpl")
public class UserServiceImpl implements UserService{

    @Autowired
    private UserMapper userMapper;

    @Override
    public User findUserByUserName(String username) {
        User user=null;
        try {
            user =userMapper.selectByUserName(username);
        }catch (Exception e){
            e.printStackTrace();
        }
        return user;
    }
}
